<template>
  <div>
    <ZgEdit
      ref="dialog"
      :view="viewData"
      :columns="columns"
      :formulas="formulas"
      validUrl=""
      saveUrl="">
    </ZgEdit>
  </div>
</template>
<script>
export default {
  data () {
    return {
      columns: [],
      formulas: [],
      viewData: { width: '60%', top: '5%', title: '编辑' }
    }
  },
  methods: {
    open (json, pageType) {
      if (pageType === 'details') {
        this.$refs.dialog.open(json)
        this.viewData.title = '详情'
      } else {
        this.$refs.dialog.open(json)
        this.viewData.title = '编辑'
      }
    }
  }
}
</script>

<style lang="scss" scoped>
</style>
